1
00:00:00,200 --> 00:00:04,380
All right so let's talk about starting and stopping services.

2
00:00:04,380 --> 00:00:05,670
So we're in Cali.

3
00:00:05,670 --> 00:00:09,820
There are a couple different ways that we can start and stop services.

4
00:00:09,960 --> 00:00:17,370
And when I talk about a service I'm talking about something like a web server or SSA H or maybe a sequel

5
00:00:17,370 --> 00:00:18,560
database.

6
00:00:18,630 --> 00:00:23,850
So when we cover this video today I'm going to show you a few different services and how to start them

7
00:00:23,880 --> 00:00:25,370
and stop them.

8
00:00:25,410 --> 00:00:32,130
I'll show you how to start them permanently on boot and we'll talk about which services are important

9
00:00:32,130 --> 00:00:33,680
to keep on boot.

10
00:00:33,690 --> 00:00:36,910
Which services are important to to start when you feel like that.

11
00:00:37,140 --> 00:00:39,470
Just starting them or when you need them etc..

12
00:00:39,480 --> 00:00:46,910
So let's start with our first service which is going to be Apache to now Apache to is a web server.

13
00:00:46,950 --> 00:00:49,870
So let's go ahead and do a proof of concept first.

14
00:00:49,950 --> 00:00:53,450
Let's start with the command that we learned in an earlier video which is I have config.

15
00:00:55,500 --> 00:01:01,230
I'm going to grab our IP V for address right here and I just want to copy this.

16
00:01:01,340 --> 00:01:03,410
I want to go out to a web browser over here

17
00:01:06,290 --> 00:01:10,110
and we're just gonna paste this address.

18
00:01:10,190 --> 00:01:13,070
Now you'll notice that it says it's unable to connect.

19
00:01:13,190 --> 00:01:17,210
This is expected here we're not running a web server.

20
00:01:17,360 --> 00:01:25,580
Now let's go back in here and let's just say service Apache to start

21
00:01:28,540 --> 00:01:29,300
OK.

22
00:01:29,470 --> 00:01:30,910
Looks like it went through.

23
00:01:30,910 --> 00:01:32,420
Let's go ahead and hit enter again.

24
00:01:32,440 --> 00:01:35,120
And now you can see the Apache to Debbie in default.

25
00:01:35,110 --> 00:01:37,260
Page has been loaded.

26
00:01:37,360 --> 00:01:38,920
So what is changed.

27
00:01:38,920 --> 00:01:44,500
Well when we boot our machine this Apache to service is not running by default.

28
00:01:44,920 --> 00:01:50,800
So if we want to run a web page then we actually have to start up the service for it to work.

29
00:01:50,920 --> 00:01:56,950
As you just saw here now you could see that if we want to add files or replace files here.

30
00:01:56,950 --> 00:02:02,170
Well we're going to have to edit DVR w w w h Tim Al folder.

31
00:02:02,410 --> 00:02:13,290
So if we come out here and we go into other locations computer and then we go into our bar w w w HCM

32
00:02:13,330 --> 00:02:17,100
Al you'll see that the index that Asian know Page is here.

33
00:02:17,100 --> 00:02:22,350
So if we actually wanted to maybe host a malicious web page and have it point back to us this is one

34
00:02:22,350 --> 00:02:27,990
way we might do it right here if we want to serve up some files say we have something that we want to

35
00:02:28,080 --> 00:02:34,290
upload to a machine that might be malicious or you know a file that we want to transfer to somebody

36
00:02:34,290 --> 00:02:35,810
else or download on another computer.

37
00:02:35,810 --> 00:02:37,440
Doesn't have to be malicious.

38
00:02:37,440 --> 00:02:40,520
We could host that file in this folder here.

39
00:02:40,560 --> 00:02:47,160
Now that is fine this is a one way to do it right you can put your files all in one location but you

40
00:02:47,160 --> 00:02:49,680
know it's not my favorite way.

41
00:02:49,680 --> 00:02:52,170
It was my favorite way when I first got started.

42
00:02:52,260 --> 00:03:00,060
There is a much easier way now and I will show you how to do that so let's go ahead and type Alice.

43
00:03:00,200 --> 00:03:01,980
You'll see we have no documents here.

44
00:03:02,000 --> 00:03:11,660
So I'm just going to echo Hello into Hello Dot text and then have that hollowed out text here.

45
00:03:11,660 --> 00:03:19,700
Now what we can actually do is we can spin up a web server so we can to say Python bash em for a module

46
00:03:20,150 --> 00:03:29,900
and say simple HDP server you can auto tab it and then say 80 for the port 0 8 is already in use so

47
00:03:29,900 --> 00:03:34,610
let's just give it 80 80 80s and use from the Apache server at the moment.

48
00:03:34,700 --> 00:03:37,600
So instead let's look at what happens.

49
00:03:37,760 --> 00:03:44,070
So let's just call it out of 80 80 and you can see here that I can go to this hallowed out text and

50
00:03:44,070 --> 00:03:45,330
actually get the file.

51
00:03:45,660 --> 00:03:51,270
I have information in real time whether or not that file was captured and overall this is just a web

52
00:03:51,270 --> 00:03:55,250
server that's so easy to spin up I can put it in the directory that I want it to.

53
00:03:55,260 --> 00:04:01,110
So if I wanted to serve my desktop folder I would navigate to desktop and then spin this this python

54
00:04:01,110 --> 00:04:02,170
module up.

55
00:04:02,310 --> 00:04:08,690
I don't have to put everything into a var W WW folder and it just makes life really really simple.

56
00:04:09,000 --> 00:04:10,760
So just proof of concept.

57
00:04:10,800 --> 00:04:18,970
We can do a service Apache to stop and we can come back and make sure that that web server has been

58
00:04:18,970 --> 00:04:25,380
stopped by going here and refreshing and I could see that it's gone.

59
00:04:25,570 --> 00:04:31,530
We can see into something like downloads we say alas there's nothing in here.

60
00:04:32,080 --> 00:04:39,610
So we can tab up a couple times and just serve up port 80 now because you can see it's not in use anymore

61
00:04:40,320 --> 00:04:43,690
and come back here refresh.

62
00:04:43,690 --> 00:04:48,660
You can see there's nothing in the directory listing because there's nothing in the folder.

63
00:04:48,760 --> 00:04:51,850
So this is just an easy way to spin up a web server.

64
00:04:51,850 --> 00:04:58,150
I think it's much easier than Apache to I'm showing you both because I like to give alternatives but

65
00:04:58,150 --> 00:05:02,200
using Python moving forward is a great great feature.

66
00:05:02,260 --> 00:05:10,290
My challenge to you is to look up how to spin up a FTB server with Python so I won't get redundant here.

67
00:05:10,300 --> 00:05:16,150
I do have future lessons and other courses that talk about this but if you want to challenge yourself

68
00:05:16,150 --> 00:05:19,930
to figure out how to spin off FTB server that's my challenge to you.

69
00:05:19,930 --> 00:05:25,250
There is a module out there that you can download quite easily and spin up your own FTB server.

70
00:05:25,450 --> 00:05:31,560
So let's go ahead and control C. We're going to close out of this and now let's talk about spinning

71
00:05:31,560 --> 00:05:33,450
up a service permanently.

72
00:05:33,450 --> 00:05:38,080
So let's say that we just had the Apache to running and then we rebooted the machine.

73
00:05:38,340 --> 00:05:43,880
When we reboot our machine Apache 2 is not going to be online because we're only doing a service start.

74
00:05:43,880 --> 00:05:45,870
It only holds during this session.

75
00:05:45,870 --> 00:05:49,600
Once we reboot that session is gone that service is gone.

76
00:05:50,010 --> 00:05:58,230
So if we want to keep something online the entire time what we can do is use sys CTO so we can say system

77
00:05:58,590 --> 00:06:04,690
CDL enable or disable if you want to disable something.

78
00:06:04,850 --> 00:06:08,120
And for example we could say SSD age now I'm not going to hit enter here.

79
00:06:08,130 --> 00:06:09,720
This is just an example.

80
00:06:09,720 --> 00:06:15,950
Well let's say that we wanted to have an SSD age available on our machines so we can SSA into it.

81
00:06:15,990 --> 00:06:18,800
We are opening up SSA age for this feature here.

82
00:06:19,370 --> 00:06:19,820
OK.

83
00:06:19,860 --> 00:06:26,570
Let's say that we want to have a server and this is when they do want you to hit enter in.

84
00:06:26,670 --> 00:06:28,260
This is going to be a database right.

85
00:06:28,260 --> 00:06:30,310
This is a post rescue well.

86
00:06:30,390 --> 00:06:37,160
So we're going to say sys CTO enable post guest you out and we have enabled that.

87
00:06:37,160 --> 00:06:41,450
So now we reboot this post rescue will load every single time.

88
00:06:41,450 --> 00:06:42,950
Now why is this important.

89
00:06:42,980 --> 00:06:50,220
Well this is important because it's going to allow us to run medicinally and have the post rescue l

90
00:06:50,240 --> 00:06:52,770
database running when we boot.

91
00:06:52,790 --> 00:06:55,060
So it doesn't have to take the extra time to load it.

92
00:06:55,070 --> 00:07:00,240
If we come over here and we just click on the Metis flight framework now post rescue is working.

93
00:07:00,440 --> 00:07:05,590
And it says database already started so it's already configured it's going to skip initialization and

94
00:07:05,660 --> 00:07:07,420
to go ahead and get right into it.

95
00:07:07,430 --> 00:07:13,370
So it just saves us a little bit of time at us but it can take some time to to run and I think that

96
00:07:13,370 --> 00:07:18,530
if you continue on I know if you continue on with being a pen tester you're definitely gonna be using

97
00:07:18,530 --> 00:07:19,610
medicinally quite a bit.

98
00:07:20,000 --> 00:07:24,950
So this is just one feature that if you're going to be using it it doesn't hurt to have it enabled on

99
00:07:24,950 --> 00:07:25,760
your system.

100
00:07:26,180 --> 00:07:32,030
Now if you feel that you want to have a patchy to boot you can go ahead and do the same thing with the

101
00:07:32,030 --> 00:07:39,520
system enable system TTL enabled but the only one that I recommend putting on is this system TTL post

102
00:07:39,530 --> 00:07:47,760
stress Q Well OK so that is it for this video in the next video we're going to be talking about installing

103
00:07:47,760 --> 00:07:53,370
how to install things from get hub and how to install using app get.

104
00:07:53,400 --> 00:07:55,670
So let's go ahead and move right into that video.
